import Vue from 'vue'
import Router from 'vue-router'

// import Login from '../views/Login.vue'
// import Register from '../views/Register.vue'
import Index from '../views/Index.vue'
import Student from '../views/Student.vue'
import Study from '../views/Study.vue'
import Community from '../views/Community.vue'
import About from '../views/About.vue'
import AboutUs from '../views/about/AboutUs.vue'
import Baihui from '../views/about/Baihuika.vue'
import ContactUs from '../views/about/ContactUs.vue'
import Customer from '../views/about/customerService.vue'

Vue.use(Router)

const routes = [
    {
        path:'/',
        redirect:"/index"
    },
    {
        path: '/index',
        component: Index
    },
    {
        path: '/student',
        component: Student
    },
    {
        path: '/study',
        component: Study
    },
    {
        path: '/community',
        component: Community
    },
    {
        path: '/about',
        component: About,
        redirect:'/about/about',
        children:[
            {
                path:"/about/about",
                component:AboutUs
            },
            {
                path:"/about/baihui",
                component:Baihui
            },
            {
                path:"/about/customer",
                component:Customer
            },
            {
                path:"/about/contactUs",
                component:ContactUs
            },
        ]
    },
]


const router = new Router({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router

